package com.ruoyi.labdata.service.impl;

import java.util.List;
import org.springframework.beans.factory.annotation.Autowired;
import org.springframework.stereotype.Service;
import com.ruoyi.labdata.mapper.LabOrgnizationSecondMapper;
import com.ruoyi.labdata.domain.LabOrgnizationSecond;
import com.ruoyi.labdata.service.ILabOrgnizationSecondService;

/**
 * 二级机构信息Service业务层处理
 * 
 * @author winner pan
 * @date 2022-02-05
 */
@Service
public class LabOrgnizationSecondServiceImpl implements ILabOrgnizationSecondService 
{
    @Autowired
    private LabOrgnizationSecondMapper labOrgnizationSecondMapper;

    /**
     * 查询二级机构信息
     * 
     * @param orgId 二级机构信息ID
     * @return 二级机构信息
     */
    @Override
    public LabOrgnizationSecond selectLabOrgnizationSecondById(Long orgId)
    {
        return labOrgnizationSecondMapper.selectLabOrgnizationSecondById(orgId);
    }

    /**
     * 查询二级机构信息列表
     * 
     * @param labOrgnizationSecond 二级机构信息
     * @return 二级机构信息
     */
    @Override
    public List<LabOrgnizationSecond> selectLabOrgnizationSecondList(LabOrgnizationSecond labOrgnizationSecond)
    {
        return labOrgnizationSecondMapper.selectLabOrgnizationSecondList(labOrgnizationSecond);
    }

    /**
     * 新增二级机构信息
     * 
     * @param labOrgnizationSecond 二级机构信息
     * @return 结果
     */
    @Override
    public int insertLabOrgnizationSecond(LabOrgnizationSecond labOrgnizationSecond)
    {
        return labOrgnizationSecondMapper.insertLabOrgnizationSecond(labOrgnizationSecond);
    }

    /**
     * 修改二级机构信息
     * 
     * @param labOrgnizationSecond 二级机构信息
     * @return 结果
     */
    @Override
    public int updateLabOrgnizationSecond(LabOrgnizationSecond labOrgnizationSecond)
    {
        return labOrgnizationSecondMapper.updateLabOrgnizationSecond(labOrgnizationSecond);
    }

    /**
     * 批量删除二级机构信息
     * 
     * @param orgIds 需要删除的二级机构信息ID
     * @return 结果
     */
    @Override
    public int deleteLabOrgnizationSecondByIds(Long[] orgIds)
    {
        return labOrgnizationSecondMapper.deleteLabOrgnizationSecondByIds(orgIds);
    }

    /**
     * 删除二级机构信息信息
     * 
     * @param orgId 二级机构信息ID
     * @return 结果
     */
    @Override
    public int deleteLabOrgnizationSecondById(Long orgId)
    {
        return labOrgnizationSecondMapper.deleteLabOrgnizationSecondById(orgId);
    }

	@Override
	public LabOrgnizationSecond getOrgstatsticData(Long orgId) {
		return labOrgnizationSecondMapper.getOrgstatsticData(orgId);
	}

	@Override
	public List<LabOrgnizationSecond> getDirectSubordinateStatistics(Long orgId) {
		return labOrgnizationSecondMapper.getDirectSubordinateStatistics(orgId);
	}

	@Override
	public List<LabOrgnizationSecond> getThirdSubordinateStatistics(Long orgId) {
		return labOrgnizationSecondMapper.getThirdSubordinateStatistics(orgId);
	}

	@Override
	public List<LabOrgnizationSecond> getUnionStatsticData(Long orgId) {
		return labOrgnizationSecondMapper.getUnionStatsticData(orgId);
	}
	
	public List<LabOrgnizationSecond> getPlatformSubordinateStatistics(Long orgId){
		return this.labOrgnizationSecondMapper.getPlatformSubordinateStatistics(orgId);
	}
}
